import { Document } from 'mongoose'

export interface IUser extends Document {
  userId: string
  username: string
  password: string
  nickname: string
  avatar: string
  phone: string
  email: string
  role?: string
  level: number
  exp: number
  coins: number
  income: number
  badges: { name: string; icon: string; obtainTime?: Date }[]
  titles: { name: string; icon: string; obtainTime?: Date }[]
  privileges: string[]
  vipLevel: number
  vipExpireTime: Date
  roomId: string
  followers: number
  following: number
  blockedUsers: string[]
  lastLoginTime: Date
  lastLoginIp: string
  status: 'active' | 'banned' | 'deleted'
  isAnchor: boolean
  settings: {
    notification: {
      follow: boolean
      gift: boolean
      message: boolean
      roomStart: boolean
    }
    privacy: {
      showLastSeen: boolean
      showPhone: boolean
      allowPrivateMessage: boolean
    }
    display: {
      theme: 'light' | 'dark'
      fontSize: number
      language: string
    }
  }
  createdAt: Date
  updatedAt: Date
}
